#ifndef _ZIASERVERUNIX_H_
#define _ZIASERVERUNIX_H_

#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <netdb.h>
#include <signal.h>
#include <iostream>
#include "../Connection.hpp"

#define	PORT	80
#define BUFLEN	4096

class	ZiaServerUnix
{
public :
	ZiaServerUnix();
	~ZiaServerUnix();

	void		LaunchServ();
	void		closeConnection();

private :
	int			ConfigNListen();
	int			SelectLoop();
	int			NewCliSocket(fd_set *StaticRFdSet, int max);
	std::string	IncomingMsg(int checkSock, fd_set *StaticRFdSet, int *max);

	int		_servSock;
};

#endif 
